package work;

import book.Booklist;

public class BackBook implements Iwork {
    public void work(Booklist booklist){
        int pos=Input.input(booklist);
        if(pos>=0) {
            if (booklist.getBook(pos).isStatus()) {
                booklist.getBook(pos).setStatus(false);
                System.out.println("归还成功，欢迎下次借阅");
            } else {
                System.out.println("抱歉，该图书尚未被借阅！");
            }
        }
    }
}
